import 'package:flutter_test/flutter_test.dart';
import 'package:iamgeqr_flutter_plugin/iamgeqr_flutter_plugin.dart';
import 'package:iamgeqr_flutter_plugin/iamgeqr_flutter_plugin_platform_interface.dart';
import 'package:iamgeqr_flutter_plugin/iamgeqr_flutter_plugin_method_channel.dart';
import 'package:plugin_platform_interface/plugin_platform_interface.dart';

class MockIamgeqrFlutterPluginPlatform
    with MockPlatformInterfaceMixin
    implements IamgeqrFlutterPluginPlatform {

  @override
  Future<String?> getPlatformVersion() => Future.value('42');

  @override
  Future<String?> imageScanQr() {
    // TODO: implement imageScanQr
    throw UnimplementedError();
  }
}

void main() {
  final IamgeqrFlutterPluginPlatform initialPlatform = IamgeqrFlutterPluginPlatform.instance;

  test('$MethodChannelIamgeqrFlutterPlugin is the default instance', () {
    expect(initialPlatform, isInstanceOf<MethodChannelIamgeqrFlutterPlugin>());
  });

  test('getPlatformVersion', () async {
    IamgeqrFlutterPlugin iamgeqrFlutterPlugin = IamgeqrFlutterPlugin();
    MockIamgeqrFlutterPluginPlatform fakePlatform = MockIamgeqrFlutterPluginPlatform();
    IamgeqrFlutterPluginPlatform.instance = fakePlatform;

    expect(await iamgeqrFlutterPlugin.getPlatformVersion(), '42');
  });
}
